A programming language is an artificial language designed to express computations that can be performed by a machine such as a computer. All programming languages translate code from human readable form to a non-human readable form. There are loosely two common classes of programming languages: interpreted languages and compiled languages. In a compiled language, source code is translated directly into a machine readable code (code that contains instructions that can be executed by a particular physical or virtual machine) once. Examples of compiled languages include C, C++ and Java. In an interpreted language, source code is translated into an intermediate form that is later further translated to machine readable code each time the code is to be run. Examples of interpreted languages include Perl and command shells.
The distinction between compilers and interpreters is blurred by languages that translate human readable source code into machine readable form that's not actually machine code (e.g., Java). An important distinction between compiled languages such as Java and interpreted languages (e.g., Perl) is based on when translation occurs. If translation occurs once for a given piece of code (as in Java), then the language is a compiled language. If the translation occurs every time the code is run (e.g., every time a new process that executes the particular code starts), then the language is an interpreted language (e.g., as in Perl).
Some interpreted languages include a function called the evaluate (‘eval’) function, which is a mechanism for executing instructions that have not yet been transformed into an intermediate form. However, conventional compiled languages do not have an ability to convert programming statements into an executable form at runtime.